/* PR lto/117288 */
/* { dg-lto-do link } */
/* { dg-lto-options { "-O0 -flto" } } */

__attribute__((noipa)) static void
foo (const void *x)
{
  (void) x;
}

static void
bar (void)
{
  unsigned char a[81] = {
    0x16, 0xfe, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x01, 0xfa, 0x01, 0x00, 0x01,
    0xee, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
    0xee, 0xfe, 0xfd, 0xc0, 0xca, 0xb5, 0x6f, 0x3d,
    0x23, 0xcc, 0x53, 0x9a, 0x67, 0x17, 0x70, 0xd3,
    0xfb, 0x23, 0x16, 0x9e, 0x4e, 0xd6, 0x7e, 0x29,
    0xab, 0xfa, 0x4c, 0xa5, 0x84, 0x95, 0xc3, 0xdb,
    0x21, 0x9a, 0x52, 0x00, 0x00, 0x00, 0x36, 0x13,
    0x01, 0x13, 0x02, 0x13, 0x03, 0xc0, 0x2c, 0xc0,
    0x2b, 0xc0, 0x30, 0xc0, 0x2f, 0x00, 0x9f, 0x00,
    0x9e,
  };
  foo (&a);
}

static void
baz (void)
{
  const struct S
  {
    unsigned char a[32];
    int b;
    unsigned char c[32];
    int d;
    unsigned char e[32];
    int f;
    unsigned char g[80];
    int h;
    unsigned char i[80];
    int j;
  } s = {
    { 0x00, }, 16,
    { 0x4f, }, 16,
    { 0x00 }, 0,
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
      0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
      0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
      0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
      0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
      0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33,
      0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33,
      0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44,
      0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44 }, 80,
    { 0xe9, }, 80,
  };

  foo (s.g);
}

__attribute__((noipa)) static void
qux (const void (*x) (void))
{
  (void) x;
}

int
main ()
{
  qux (&baz);
  qux (&bar);
}
